#include "MessageIdentifiers.h"
#include "RakAssert.h"

#ifndef __CHAT_ORDER_H
#define __CHAT_ORDER_H 


#pragma once

namespace ChatApp
{

// Maximum of incoming connections
#define MAX_INCOMING_CONNECTIONS  5
// Maximum of digit bits
#define MAX_DIGIT_BIT MAX_INCOMING_CONNECTIONS / 10 + 1
// Maximum of friend list
#define MAX_FRIEND_NUM 10
// Maximum of roll number
#define MAX_ROLL_NUM 4

struct OrderMessage;

enum DefaultChatOrder
{
	// Friend request order
	CO_FRIEND_REQUEST,
	// Agree friend request order
	CO_FRIEND_REQUEST_AGREE,
	// Refuse friend request order
	CO_FRIEND_REQUEST_REFUSE,
	// Check client list order
	CO_CLIENT_LIST,
	// Check friend list order
	CO_FRIEND_LIST,
	// Private chat order
	CO_PRIVATE_CHAT,
	// The chatter is busy
	CO_CHATTER_BUSY,
	// The chatter is free
	CO_CHATTER_FREE,
    // Name oneself
    CO_CHATTER_NAME,
    // Roll
    CO_CHATTER_ROLL,
	// It is not a order

    // For Game
    CO_GAME_PACKALL,
    CO_GAME_PACK,

    CO_GAME_LV,
	CO_GAME_EXP,
    CO_GAME_HP,
    CO_GAME_STR,
    CO_GAME_DEF,
    CO_GAME_HIT,
    CO_GAME_DEX,
    CO_GAME_INT,
    CO_GAME_MDF,

    CO_GAME_GOLD,
    CO_GAME_CARRY,
    CO_GAME_MAXCARRY,

	CO_GAME_EQUIP,
	CO_GAME_UNEQUIP,

    CO_PACK_INSERT,
    CO_PACK_DROP,

	CO_NOT_ORDER
};

#endif

#pragma pack(push, 1)
struct OrderMessage
{
	unsigned char typeId;  // Packet type ID
	DefaultChatOrder order;// Order information
	char message[2048];    // Message information
	int memberId;          // The ID of member who be called
}; // End of OrderMessage
#pragma pack(pop)

}

